﻿using Newtonsoft.Json;
using ShanNiang.Hosting.Common;
using ShanNiang.Hosting.Enumerate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace ShanNiang.Service.LoginModels.Requests
{
    public class BoundLoginRequest : RequestBase
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [JsonProperty("username")]
        [JsonPropertyName("username")]
        public string? UserName { get; set; }
        /// <summary>
        /// 登录键
        /// </summary>
        [JsonProperty("provider_key")]
        [JsonPropertyName("provider_key")]
        public string? ProviderKey { get; set; }
        /// <summary>
        /// 登录方式
        /// </summary>
        [JsonProperty("login_provider")]
        [JsonPropertyName("login_provider")]
        public string? LoginProvider { get; set; }
        /// <summary>
        /// 签名
        /// </summary>
        [JsonProperty("sign")]
        [JsonPropertyName("sign")]
        public string? Sign { get; set; }
        /// <summary>
        /// 登陆随机id
        /// </summary>
        [JsonProperty("login_key")]
        [JsonPropertyName("login_key")]
        public string? LoginKey { get; set; }


        public override ApiServer ApiServer => ApiServer.IdsServer;

        public override HttpMethod Method => HttpMethod.Post;

        public override bool NeedToken => false;

        protected override string RequestPath => "/App/BoundLogin";
    }
}
